package com.truongnha.clienttn.business.model;

public class TeacherAttendModel {
	private String studentId;
	private int index;
	private String name;
	private int status;
	private String birth;
	private String sex;
	private String phone;
	private String email;

	public TeacherAttendModel() {
		this.studentId = "";
		this.index = 0;
		this.name = "";
		this.status = 3;
		this.birth = "";
		this.sex = "";
		this.phone = "";
		this.email = "";
	}

	public TeacherAttendModel(String studentId, int index, String name,
			String birth, String sex, String status) {
		this.studentId = studentId;
		this.index = index;
		this.name = name;
		if (status.equals("P"))
			this.status = 1;
		else if (status.equals("K"))
			this.status = 0;
		else if (status.equals("M"))
			this.status = 2;
		else
			this.status = 3;

		//this.status = status;// 3 Di hoc; 1- Co phep; 0- Khong phep; 2-Di hoc
								// muon
		this.birth = birth;
		this.sex = sex;
		this.phone = "";
		this.email = "";
	}

	public TeacherAttendModel(String studentId, int index, String name,
			String birth, String sex, int status) {
		this.studentId = studentId;
		this.index = index;
		this.name = name;
		this.status = status;// 3 Di hoc; 1- Co phep; 0- Khong phep; 2-Di hoc
								// muon
		this.birth = birth;
		this.sex = sex;
		this.phone = "";
		this.email = "";
	}
	
	public String getId() {
		return studentId;
	}

	public void setId(String id) {
		this.studentId = id;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBirth() {
		return birth;
	}

	public void setBirth(String birth) {
		this.birth = birth;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public int getStatus() {
		//return "M";
		return this.status;
	}
	// 3 Di hoc; 1- Co phep; 0- Khong phep; 2-Di hoc muon
	
	public String getStatusString() {
		if (this.status == 0)
			return "K";
		else if (this.status == 1)
			return "P";
		else if (this.status == 2)
			return "M";
		else 
			return "";
	}
	
	public void setStatus(int status) {
		this.status = status;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmail() {
		return this.email;
	}
}// End class